<%@ include file="/common/taglibs.jsp"%>

<head>
<title><fmt:message key="searchBirth.title" /></title>
<meta name="menu" content="AdminMenu" />
<script type="text/javascript" src="scripts/datetimepicker.js">
	//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
	//Script featured on JavaScript Kit (http://www.javascriptkit.com)
	//For this script, visit http://www.javascriptkit.com
</script>
</head>

<!--div>
	<h2>
		<fmt:message key="searchBirth.heading" />
	</h2>
	<p>
		<fmt:message key="searchBirth.message" />
	</p>
</div-->
<div class="span4" >
	<s:form name="searchBirthForm" action="searchBirthRecord.action" method="post"
		validate="true" cssClass="well form-vertical">
		
		<br/>
		<s:textfield name="birth.id" label="%{getText('search.id')}"
			required="true" />
		<s:textfield name="birth.motherName" label="%{getText('search.motherName')}"
			/>
		<s:textfield name="birth.fatherName" label="%{getText('search.fatherName')}"
			/>
		
		<s:select name="birth.sex" key="birth.sex"  list="#{'':'All','Approved':'Approved','Submit':'Submit','Draft':'Draft'}"></s:select>
		
		<s:select name="birth.sex" key="birth.sex"  list="#{'All':'All','Male':'Male','Female':'Female'}"></s:select>
		
		<fieldset class="control-group">
						<label class="control-label"> Start Date</label>
						<div class="controls">
							<input id="birthdate" name="birth.birthDateString" type="text"
								size="20" title="date" contenteditable="false" value="${birth.birthDateString}"> <a
								href="javascript:NewCal('birthdate','ddmmmyyyy',true,24)"><img
								src="images/cal.gif" width="20" height="20" border="0"
								alt="Pick date and time"> </a>
						</div>
		</fieldset>
		
		<fieldset class="control-group">
						<label class="control-label"> End Date</label>
						<div class="controls">
							<input id="birthdate" name="birth.birthDateString" type="text"
								size="25" title="date" contenteditable="false" value="${birth.birthDateString}"> <a
								href="javascript:NewCal('birthdate','ddmmmyyyy',true,24)"><img
								src="images/cal.gif" width="20" height="20" border="0"
								alt="Pick date and time"> </a>
						</div>
		</fieldset>
		
		<!--
		<s:date name="startDate" />
		<s:date name="endDate"/>
		-->

		<fieldset class="form-actions">
			<s:submit key="button.search" name="search" cssClass="btn btn-primary" theme="simple" />
			<input type="button" value="<fmt:message key="button.cancel"/>" class="btn" onclick="this.form.onsubmit = null; location.href='mainMenu'" />
		</fieldset>
	</s:form>
</div>
<div class="span8">		
		 <display:table name="birthList" cellspacing="0" cellpadding="0" requestURI=""
                   defaultsort="1" id="births" pagesize="25" class="table table-condensed" export="false">
        <display:column property="motherName" escapeXml="true" sortable="true" titleKey="birth.motherName" style="width: 20%"
                        url="/viewBirthDetails.action?from=list" paramId="id" paramProperty="id"/>
                        
        <display:column property="fatherName" escapeXml="true" sortable="true" titleKey="birth.fatherName"
                        style="width: 20%"/>
		<display:column property="status" escapeXml="true" sortable="true" title="Status"
                        style="width: 10%"/>                        
        <display:column property="sex" sortable="true" titleKey="birth.sex" style="width: 10%" autolink="true"
                        media="html"/>
        <display:column property="motherName" titleKey="birth.motherName" media="csv xml excel pdf"/>
        <display:column property="birthDate" sortable="true" titleKey="birth.birthDate" style="width: 25%" autolink="true"
                        media="html"/> 
        <display:column property="birthDate" titleKey="birth.birthDate" media="csv xml excel pdf"/>

        <display:setProperty name="paging.banner.item_name" value="birth record"/>
        <display:setProperty name="paging.banner.items_name" value="birth records"/>

        <display:setProperty name="export.excel.filename" value="Birth List.xls"/>
        <display:setProperty name="export.csv.filename" value="Birth List.csv"/>
        <display:setProperty name="export.pdf.filename" value="Birth List.pdf"/>
    </display:table>
</div>    
	

